package com.ag.bean;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.ag.zhh.vo.UserDeptContact;

//虚拟组
@Entity
@Table(name = "TB_UNREAL_GROUP", schema = "dbo", catalog = "AGDB")
public class TbUrealGroup implements java.io.Serializable{

	public int groupId;
	public String groupName;
	public TbUser user;
	public String a;
	public String b;
	public String c;
	public Set<TbUserContact> contacts;
		
	@Id
	@GeneratedValue
	@Column(name = "GROUP_ID", unique = true, nullable = false)
	public int getGroupId() {
		return groupId;
	}
//	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "group")
	public Set<TbUserContact> getContacts() {
		return contacts;
	}

	public void setContacts(Set<TbUserContact> contacts) {
		this.contacts = contacts;
	}

	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}
	@Column(name = "GROUP_NAME", nullable = false, length = 30)
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID")
	public TbUser getUser() {
		return user;
	}
	public void setUser(TbUser user) {
		this.user = user;
	}
	


	public String getA() {
		return a;
	}
	public void setA(String a) {
		this.a = a;
	}
	public String getB() {
		return b;
	}
	public void setB(String b) {
		this.b = b;
	}
	public String getC() {
		return c;
	}
	public void setC(String c) {
		this.c = c;
	}
	public TbUrealGroup(int groupId, String groupName, TbUser user, String a,
			String b, String c) {
		super();
		this.groupId = groupId;
		this.groupName = groupName;
		this.user = user;
		this.a = a;
		this.b = b;
		this.c = c;
	}
	public TbUrealGroup() {
		super();
		// TODO Auto-generated constructor stub
	}
	
}
